import type { App } from "vue";
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import ButtonVue from "./components/Button";
import AlertVue from "./components/Alert";
import collapseVue , {collapseItemVue} from "./components/collapse";
import DropdownVue from "./components/Dropdown";
import FormVue , {FormItemVue} from "./components/Form";
import IconVue from "./components/Icon";
import InputVue from "./components/Input";
import MessageVue , {createMessage , closeAll} from "./components/Message";
import SelectVue from "./components/Select";
import SwitchVue from "./components/Switch";
import TooltipVue from "./components/Tooltip";
import './styles/index.css'
library.add(fas)
const components = [
    ButtonVue,
    AlertVue,
    collapseVue,
    collapseItemVue,
    DropdownVue,
    FormVue,
    FormItemVue,
    IconVue,
    InputVue,
    MessageVue,
    SelectVue,
    SwitchVue,
    TooltipVue
]
const install = (app:App)=>{
    components.forEach(component=>{
        app.component(component.name!,component)
    })
}

export default {
    install
}

export {
    install,
    createMessage,
    closeAll,
    ButtonVue,
    AlertVue,
    collapseVue,
    collapseItemVue,
    DropdownVue,
    FormVue,
    FormItemVue,
    IconVue,
    InputVue,
    MessageVue,
    SelectVue,
    SwitchVue,
    TooltipVue
}